package com.cmict.data.system.dal.mysql.encode;

import com.cmict.data.framework.mybatis.core.mapper.BaseMapperX;
import com.cmict.data.system.controller.admin.encode.vo.EncodeDetailsReqVO;
import com.cmict.data.system.dal.dataobject.encode.EncodeDetailsDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

@Mapper
public interface EncodeDetailsMapper extends BaseMapperX<EncodeDetailsDO> {

    default List<EncodeDetailsDO> selectList(EncodeDetailsReqVO reqVO) {
        return selectList("encode_id",reqVO.getEncodeId());
    }
    default List<EncodeDetailsDO> selectList(Long id) {
        return selectList("encode_id",id);
    }

    @Select({"select id from system_encoding_details where encode_id in (${encodeIds})"})
    Set<Long> getEncodeDetailsId(@Param("encodeIds") String encodeIds);
}
